import type {
  SearchSettingItem,
  SearchMapItem,
  GameId,
  DeckConfigData,
  DeckDetail,
} from '/@/api/currentDeck/model/deckModel';
import type { DropdownItemOption } from 'vant';

export type { GameId, DeckConfigData, DeckDetail, SearchMapItem };

export type SearchSettingDealItem = Writable<
  Omit<SearchSettingItem, 'mapping'> & {
    mapping: DropdownItemOption[];
  }
>;

export type SearchSettingList = SearchSettingDealItem[];

export type setDeckAttrItem = { attr_key: string; value: string };

export type SetDeckItem = {
  deck_id: number;
  deck_name: string;
  publish_at: number;
  price: number;
  tags: string[];
  show_attr: setDeckAttrItem[];
  user_info: {
    user_id: number;
    nickname: string;
    avatar: string;
    border: string;
  };
};

export type SetDeckList = {
  total: number;
  rows: SetDeckItem[];
};

export type SetDeckQueryParams = {
  game_id: string;
  deck_name?: string;
  tags?: string[];
  card_ids?: string[];
  page: number;
  page_size: number;
  [key: string]: any;
};

export type LikeParams = Pick<DeckDetail, 'deck_id' | 'is_like'>;
